#pragma once

#define STRING_CONFIG_FILEPLACE TEXT("srunx.ini")
#define STRING_CONFIG_APP TEXT("SRUNX_BETA")
#define STRING_CONFIG_KEY_UN TEXT("US")
#define STRING_CONFIG_KEY_PW TEXT("PW")
#define STRING_CONFIG_KEY_CF TEXT("CF")
#define STRING_CONFIG_KEY_MD TEXT("MD")

typedef struct _SRUNX_CONFIG_INFO {
	TCHAR username[LENGTH_STRING_MAX_CONFIG];
	TCHAR password[LENGTH_STRING_MAX_CONFIG];
	DWORD UIConfig;
	UINT Mode;
} SRUNX_CONFIG_INFO;

class module_configure
{
public:
	module_configure(void);
	~module_configure(void);
	BOOL getConfigInfo(SRUNX_CONFIG_INFO *);
	BOOL setConfigInfo(SRUNX_CONFIG_INFO *);
	BOOL saveConfigInfo();
private:
	BOOL loadConfigInfo();
	VOID encrypt(TCHAR *, BOOL);
	SRUNX_CONFIG_INFO ConfigInfo;
	TCHAR ConfigFile[MAX_PATH];
	TCHAR ConfigAPP[LENGTH_STRING_MAX_CONFIG];
	TCHAR ConfigKEY[4][LENGTH_STRING_MAX_CONFIG];
};
